import {getSearchList} from 'http'
const OK =200
export default {
    state:{
        searchList:{}
    },
    getters:{},
    mutations:{
        getSearchList(state,searchList){
            state.searchList = searchList
        }
    },
    actions:{
        async getSearchList({commit},options){
            const {code,data} =  await getSearchList(options)
            if(code === OK){
                commit('getSearchList',data)
            }
            return data
        }
    }
}